#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
using namespace std;

//class A					       { public: int _a1; int _a2; int _a3; };
//
//class B : virtual public A	   { public: int _b; };
//
//class C : virtual public A     { public: int _c; };
//
//class D : public B, public C   { public: int _d; };

// A   X   A
//   B     C
//      D
//class A								 { public: int _a; };
//
//class X								 { public: int _x; };
//
//class B : virtual public A, public X { public: int _b; };
//
//class C : virtual public A			 { public: int _c; };
//
//class D : public B, public C		 { public: int _d; };

class A							               { public: int _a; };

class B : virtual public A			           { public: int _b; };

class C : public A			                   { public: int _c; };

class D : public A							   { public: int _d; };

class E : public B, virtual public C, public D { public: int _e; };


int main()
{
	//D d;
	//d.B::_a1 = 1;
	//d.B::_a2 = 2;
	//d.B::_a3 = 3;
	//d.C::_a1 = 1;
	//d.C::_a2 = 2;
	//d.C::_a3 = 3;
	//d._b = 4;
	//d._c = 5;
	//d._d = 6;

	//D d;
	//d.B::_a = 1;
	//d.C::_a = 2;
	//d._x = 3;
	//d._b = 4;
	//d._c = 5;
	//d._d = 6;

	E e;
	e.B::_a = 1;
	e.C::_a = 2;
	e.D::_a = 3;
	e._b = 4;
	e._c = 5;
	e._d = 6;
	e._e = 7;

	return 0;
}